import request from '@/utils/request'

export const getPicCode = () => {
  return request.get('captcha/image')
}
export const getSmsCaptcha = (form) => {
  return request.post('/captcha/sendSmsCaptcha', {
    form: {
      captchaCode: form.picCode,
      captchaKey: form.picKey,
      mobile: form.mobile
    }
  })
}

export const codeLogin = (form) => {
  return request.post('/passport/login', {
    form: {
      isParty: false,
      mobile: form.mobile,
      partyData: {},
      smsCode: form.smsCode
    }
  })
}
